<!--
  Copyright [2025] [OBARA (Nanjing) Electromechanical Co., Ltd]

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->


{% extends 'base_en.html' %}

{% block title %}Home - OBARA Welding Gun Selection Database{% endblock %}

{% block content %}
<div class="row justify-content-center">
    <div class="col-lg-10">
        <!-- Welcome Banner -->
        <div class="text-center mb-5 fade-in-up">
            <div class="card border-0" style="background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white;">
                <div class="card-body py-5">
                    <h1 class="display-4 fw-bold mb-3 pulse">
                        <i class="fas fa-industry me-3"></i>
                        OBARA Welding Gun Selection Database
                    </h1>
                    <p class="lead mb-4">
                        Be customer-oriented care employees encourage innovations take in the fresh
                    </p>
                    {% if not user.is_authenticated %}
                        <a href="{% url 'clamps:login_en' %}" class="btn btn-light btn-lg px-5 py-3">
                            <i class="bi bi-box-arrow-in-right me-2"></i>
                            Login Now
                        </a>
                    {% else %}
                        <a href="{% url 'clamps:search_en' %}" class="btn btn-light btn-lg px-5 py-3">
                            <i class="bi bi-search me-2"></i>
                            Start Selection
                        </a>
                    {% endif %}
                </div>
            </div>
        </div>

        {% if user.is_authenticated %}
            <!-- Feature Cards -->
            <div class="row g-4 mb-5">
                <div class="col-md-6">
                    <div class="card h-100 fade-in-up">
                        <div class="card-body text-center p-4">
                            <div class="mb-3">
                                <i class="bi bi-search text-primary" style="font-size: 3rem;"></i>
                            </div>
                            <h4 class="card-title">Product Search</h4>
                            <p class="card-text text-muted">
                                Quickly find products that meet the requirements through multiple parameters, supporting AI search and regular search.
                            </p>
                            <a href="{% url 'clamps:search_en' %}" class="btn btn-primary">
                                <i class="bi bi-arrow-right me-2"></i>Start Search
                            </a>
                        </div>
                    </div>
                </div>
                
                {% if user.is_staff %}
                    <div class="col-md-6">
                        <div class="card h-100 fade-in-up">
                            <div class="card-body text-center p-4">
                                <div class="mb-3">
                                    <i class="bi bi-gear text-success" style="font-size: 3rem;"></i>
                                </div>
                                <h4 class="card-title">Management Console</h4>
                                <p class="card-text text-muted">
                                    Manage user accounts, view operation logs, export data and other administrator-specific functions.
                                </p>
                                <a href="{% url 'clamps:management_dashboard' %}" class="btn btn-success">
                                    <i class="bi bi-arrow-right me-2"></i>Enter Management
                                </a>
                            </div>
                        </div>
                    </div>
                {% else %}
                    <div class="col-md-6">
                        <div class="card h-100 fade-in-up">
                            <div class="card-body text-center p-4">
                                <div class="mb-3">
                                    <i class="bi bi-download text-info" style="font-size: 3rem;"></i>
                                </div>
                                <h4 class="card-title">File Download</h4>
                                <p class="card-text text-muted">
                                    Download technical documents such as PDF drawings, STEP models, and ZIP compression files for the product.
                                </p>
                                <a href="{% url 'clamps:search_en' %}" class="btn btn-info">
                                    <i class="bi bi-arrow-right me-2"></i>View Products
                                </a>
                            </div>
                        </div>
                    </div>
                {% endif %}
            </div>
        {% endif %}

        <!-- Product Categories -->
        <div class="row g-4 mb-5">
            <div class="col-12">
                <h2 class="text-center mb-4">
                    <i class="bi bi-diagram-3 me-2"></i>
                    Product Categories
                </h2>
            </div>
            
            <div class="col-md-4">
                <div class="card h-100 fade-in-up">
                    <div class="card-header text-center">
                        <h5 class="mb-0">
                            <i class="bi bi-tools me-2"></i>
                            C-Type Welding Gun
                        </h5>
                    </div>
                    <div class="card-body">
                        <ul class="list-unstyled">
                            <li class="mb-2">
                                <i class="bi bi-check-circle text-success me-2"></i>
                                X2C-C
                            </li>
                            <li class="mb-2">
                                <i class="bi bi-check-circle text-success me-2"></i>
                                X2C-V2-C
                            </li>
                            <li class="mb-2">
                                <i class="bi bi-check-circle text-success me-2"></i>
                                X2C-V3-C
                            </li>
                        </ul>
                        <p class="text-muted small">
                            Suitable for standard welding applications with good accessibility and stability.
                        </p>
                    </div>
                </div>
            </div>
            
            <div class="col-md-4">
                <div class="card h-100 fade-in-up">
                    <div class="card-header text-center">
                        <h5 class="mb-0">
                            <i class="bi bi-tools me-2"></i>
                            X-Type Welding Gun
                        </h5>
                    </div>
                    <div class="card-body">
                        <ul class="list-unstyled">
                            <li class="mb-2">
                                <i class="bi bi-check-circle text-success me-2"></i>
                                X2C-X
                            </li>
                            <li class="mb-2">
                                <i class="bi bi-check-circle text-success me-2"></i>
                                X2C-V2-X
                            </li>
                            <li class="mb-2">
                                <i class="bi bi-check-circle text-success me-2"></i>
                                X2C-V3-X
                            </li>
                        </ul>
                        <p class="text-muted small">
                            Suitable for welding complex geometric shapes, providing greater flexibility.
                        </p>
                    </div>
                </div>
            </div>
            
            <div class="col-md-4">
                <div class="card h-100 fade-in-up">
                    <div class="card-header text-center">
                        <h5 class="mb-0">
                            <i class="bi bi-gear me-2"></i>
                            Technical Features
                        </h5>
                    </div>
                    <div class="card-body">
                        <ul class="list-unstyled">
                            <li class="mb-2">
                                <i class="bi bi-lightning text-warning me-2"></i>
                                High Precision Control
                            </li>
                            <li class="mb-2">
                                <i class="bi bi-shield-check text-primary me-2"></i>
                                Reliability Assurance
                            </li>
                            <li class="mb-2">
                                <i class="bi bi-speedometer2 text-info me-2"></i>
                                High Efficiency Production
                            </li>
                        </ul>
                        <p class="text-muted small">
                            Advanced control technology ensures welding quality and production efficiency.
                        </p>
                    </div>
                </div>
            </div>
        </div>

        <!-- Contact Information -->
        <div class="card fade-in-up">
            <div class="card-header text-center">
                <h4 class="mb-0">
                    <i class="bi bi-telephone me-2"></i>
                    Contact Us
                </h4>
            </div>
            <div class="card-body">
                <div class="row">
                    <div class="col-md-6">
                        <h5>
                            <i class="bi bi-building me-2"></i>
                            OBARA (Nanjing) Electromechanical Co., Ltd
                        </h5>
                        <p class="mb-2">
                            <i class="bi bi-geo-alt me-2"></i>
                            <strong>Address:</strong>
                            <a href="https://j.map.baidu.com/73/Y8F" target="_blank" class="text-decoration-none">
                                No.28, Renjie Road, Jiangning District, Nanjing, China
                            </a>
                        </p>
                        <p class="mb-2">
                            <i class="bi bi-telephone me-2"></i>
                            <strong>Sales Department:</strong>(025)52106195
                        </p>
                        <p class="mb-2">
                            <i class="bi bi-envelope me-2"></i>
                            <strong>Sales Dept Email:</strong>
                            <a href="mailto:lufm@obara.com.cn" class="text-decoration-none">lufm@obara.com.cn</a>
                        </p>
                        <p class="mb-0">
                            <i class="bi bi-globe me-2"></i>
                            <strong>Visit OBARA (China) Official Website:</strong>
                            <a href="https://www.obara.com.cn" target="_blank" class="text-decoration-none">
                                www.obara.com.cn
                            </a>
                        </p>
                    </div>
					<div class="col-md-6">
                        <h5>
                            <i class="bi bi-building me-2"></i>
                            OBARA (Shanghai) Co., Ltd
                        </h5>
                        <p class="mb-2">
                            <i class="bi bi-geo-alt me-2"></i>
                            <strong>Address:</strong>
                            <a href="https://j.map.baidu.com/d9/tj0k" target="_blank" class="text-decoration-none">
                                No. 17, Aidou Road, Pudong New Area, Shanghai, China
                            </a>
                        </p>
                        <p class="mb-2">
                            <i class="bi bi-telephone me-2"></i>
                            <strong>Sales Department:</strong>(021)50461510
                        </p>
                        <p class="mb-2">
                            <i class="bi bi-envelope me-2"></i>
                            <strong>Sales Dept Email:</strong>
                            <a href="mailto:wujm@obara.com.cn" class="text-decoration-none">wujm@obara.com.cn</a>
                        </p>
                        <p class="mb-0">
                            <i class="bi bi-globe me-2"></i>
                            <strong>Visit OBARA (China) Official Website:</strong>
                            <a href="https://www.obara.com.cn" target="_blank" class="text-decoration-none">
                                www.obara.com.cn
                            </a>
                        </p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}

